package com.example.demo.dao;

import com.example.demo.entity.Common;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface CommonRepository extends JpaRepository<Common, Long> {

    @Query(value = "select text(JSON_AGG(t) from (select * from user_info) t", nativeQuery = true)
    String test();

    @Query(value = "select * from user_info", nativeQuery = true)
    List<?> test2();
}